Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dockers]: Manage all Docker containers with Supervisord #573

Merged
merged 17 commits into from
May 8, 2017
Merged

[Dockers]: Manage all Docker containers with Supervisord #573

merged 17 commits into from
May 8, 2017

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented May 6, 2017

This PR serves a number of purposes:

  1. Consolidates config.sh and start.sh scripts into one script (start.sh).
  2. Solves issue [dockers]: "docker stop" command fails on dockers with shell entrypoints #435 - All dockers now run supervisord as their ENTRYPOINT
    • Note that while supervisord has a "priority" system, it does not have a mechanism to start processes in a guaranteed order (i.e., it will not block until a process starts). I worked around this by using start.sh as a bootstrap script in dockers that start multiple processes. This script starts each process that is to be managed by supervisord using supervisorctl start, which will block until it completes. Each supervisor.conf file is configured to autostart only start.sh. All processes started using supervisorctl in start.sh are added to supervisor.conf but set to not autostart. This allows them to be started by start.sh yet be monitored by supervisord (the process must be started using supervisorctl in start.sh to be monitored).
  3. All stdout/stderr output from processes managed by supervisord is now sent to syslog instead of their own files. This not only consolidates all output to syslog, it also saves disk space.
  4. Supervisord log messages also sent to syslog (unfortunately supervisord has no native ability to log to syslog, so I accomplished this by using rsyslogd to monitor the supervisor log. This also allowed me to shrink the max supervisor log size (1MB) and number of rotated copies (2), as the supervisor logs are now redundant. We could further reduce these values in the future if we see a need.

These changes were made to all dockers currently in use except docker-fpm-frr as I have no device to test on (will create an issue once this PR is merged). Other dockers not updated are deprecated and should be removed in the near future (see issue #572)

  • Also removed unused smartmontools package from docker-platform-monitor


trap clean_up SIGTERM SIGKILL

service syncd start
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syncd still managed by service not supervisord?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syncd has a complex init script. I don't have much experience with syncd operations and testing methods, so I figured this task would be best left to someone with more experience. Init script functionality just needs to be ported into the syncd.sh script I created.

@lguohan
Copy link
Collaborator

lguohan commented May 8, 2017

:shipit:

@jleveque jleveque merged commit 8f34839 into sonic-net:master May 8, 2017
@jleveque jleveque deleted the supervisorize_dockers branch May 8, 2017 22:43
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
* Allow decap tunnel configuration without "src_ip"

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* Remove overlay loopback interface when removing tunnel

After tunnel removal there was still overlay loopback
interface in ASIC DB.

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* Add more test cases to test_tunnel.py

Seperate symmetric and decap tunnel test
Add checks for tunnel removal

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
judyjoseph added a commit that referenced this pull request Mar 27, 2020
The following changes are included in this submodule advance

54b2510 [syncd] Use correct VID when GET will fail to obrain object type (#577)
59b0430 [syncd] Unlock vendor api lock if enabling diag shell (#571)
910d45e [vs] Add more logs when setting MTU on port (#576)
c0d9947 [vs] Fix setting correct port mtu value (#573)
lguohan pushed a commit that referenced this pull request Apr 8, 2020
* f4d9398 2020-04-07 | [vs] Set mto only on tap device (#592) [Kamil Cudnik]
* 0ad13f5 2020-04-07 | [lgtm]: add lgtm static analysis configuration (#589) [lguohan]
* c961260 2020-04-07 | add swss-common-{inc,lib} to specify the prefix of swss-common library (#590) [lguohan]
* 2d68abc 2020-04-06 | [syncd] Load correct global context id (#588) [Kamil Cudnik]
* cd82389 2020-04-06 | Return correct error code when port is in use (#565) [Vasant Patil]
* 2189c2f 2020-04-02 | [syncd] Pass correct switch RID when staring diag shell (#587) [Kamil Cudnik]
* 91792db 2020-04-01 | [syncd] Fix crash during stats polling (#586) [Vitaliy Senchyshyn]
* d13521e 2020-04-01 | [meta] Flush fdb entries after flush api success (#581) [Kamil Cudnik]
* 54b2510 2020-03-17 | [syncd] Use correct VID when GET will fail to obrain object type (#577) [Kamil Cudnik]
* 59b0430 2020-03-16 | [syncd] Unlock vendor api lock if enabling diag shell (#571) [Kamil Cudnik]
* 910d45e 2020-03-16 | [vs] Add more logs when setting MTU on port (#576) [Kamil Cudnik]
* c0d9947 2020-03-13 | [vs] Fix setting correct port mtu value (#573) [Kamil Cudnik]
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this pull request Aug 31, 2020
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Jan 18, 2022
d00a25bb [ci] refer 202106 branch resources rather than master branch. (sonic-net#573)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
liat-grozovik pushed a commit that referenced this pull request Jan 18, 2022
d00a25bb [ci] refer 202106 branch resources rather than master branch. (#573)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants